package edu.suda.xsap.service.impl;

import edu.suda.xsap.dto.Statistics_membercardDto;
import edu.suda.xsap.dto.convert.Statistics_membercardConvert;
import edu.suda.xsap.entity.Statistics_membercard;
import edu.suda.xsap.mapper.Statistics_membercardMapper;
import edu.suda.xsap.service.Statistics_membercardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Statistics_membercardServiceImpl implements Statistics_membercardService {

    @Autowired
    private Statistics_membercardConvert statistics_membercardConvert;

    @Autowired
    private Statistics_membercardMapper statistics_membercardMapper;

    @Override
    public List<Statistics_membercardDto> findAll() {
        //
        List<Statistics_membercard> statistics_membercards = statistics_membercardMapper.findAll();
        //要把这个List<smC>转换成List<smCDto>
        return statistics_membercardConvert.toDtoList(statistics_membercards);
    }
}
